<#assign module="company"/>

<@override name="header">
<link rel="stylesheet" href="${ctx}/assets/css/bootstrap-switch.min.css">
<link rel="stylesheet" href="${ctx}/assets/css/uploadify.css">
<link rel="stylesheet" href="${ctx}/assets/css/datetimepicker.css">
</@override>
<@override name="body">
<div class="row">
    <div class="col-md-12">
        <div class="tabbable"> <!-- Only required for left/right tabs -->
            <ul class="nav nav-tabs">
                <li class="active"><a href="#tab2" data-toggle="tab">收费内容</a></li>
                <li><a href="#tab3" data-toggle="tab">客户推荐提成</a></li>
<#--                <li><a href="#tab4" data-toggle="tab">服务人员推荐提成</a></li>-->
                <@gasstation>
                	<@shiro.hasPermission name='gasstation'>
                		<li><a href="#tab13" data-toggle="tab">加油推荐提成</a></li>
                	</@shiro.hasPermission>
                </@gasstation>
                <li><a href="#tab5" data-toggle="tab">客户二维码</a></li>
                <li><a href="#tab6" data-toggle="tab">服务人员二维码</a></li>
                <li><a href="#tab7" data-toggle="tab">客户服务协议</a></li>
                <li><a href="#tab8" data-toggle="tab">服务人员协议</a></li>
                <li><a href="#tab9" data-toggle="tab">分享设置</a></li>
                <li><a href="#tab10" data-toggle="tab">自定义内容</a></li>
                <@jgpt><li><a href="#tab11" data-toggle="tab">公司基础信息</a></li></@jgpt>
                <@jgpt><li><a href="#tab12" data-toggle="tab">公司服务所在地服务机构基本信息</a></li></@jgpt>
                <!--<li><a href="#tab14" data-toggle="tab">保价说明</a></li>-->
            </ul>
            <form id="submit_form" action="${ctx}/company/saveSetting" class="form-horizontal" role="form" method="post">
                <input type="hidden" id="companyId" name="companyId" value="${company.id?if_exists}">

                <div class="form-group margin-top">
                    <div class="col-sm-3">	
                        <input id="submit_button" type="submit" class="btn btn-primary" value="保存设置">
                        <input type="button" class="btn btn-default" onclick="window.location.href = '${ctx}/company/list';" value="返回">
                    </div>
                </div>

                <div class="tab-content">
                    <div class="tab-pane fade in active" id="tab2">
                        <div class="panel panel-default margin-top">
                            <div class="panel-heading">收费内容</div>
                            <div class="panel-body">
                            	<div class="form-group">
                                    <label class="col-sm-1 control-label">代驾险金额：</label>
                                    <div class="col-sm-2">
                                    	<div class="input-group">
                                            <input class="form-control" value="${company.djxFee?if_exists}" name="djxFee" type="text" min="0" pattern="[0-9]+(.[0-9]{1,2})?" title="请输入正确的金额格式:1,1.1,1.25" />
                                            <span class="input-group-addon">元/单</span>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-1 control-label">意外险金额：</label>
                                    <div class="col-sm-2">
                                    	<div class="input-group">
                                            <input class="form-control" value="${company.ywxFee?if_exists}" name="ywxFee" type="text" min="0" pattern="[0-9]+(.[0-9]{1,2})?" title="请输入正确的金额格式:1,1.1,1.25" />
                                            <span class="input-group-addon">元/单</span>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-1 control-label">信息费：</label>
                                    <div class="col-sm-2">
                                    	<div class="input-group">
                                            <input class="form-control" value="${company.infoFee?if_exists}" name="infoFee" type="text" min="0" pattern="[0-9]+(.[0-9]{1,2})?" title="请输入正确的金额格式:1,1.1,1.25" />
                                            <span class="input-group-addon">元/单</span>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-1 control-label">扣取方式：</label>
                                    <div class="col-sm-2">
                                    	<select class="form-control" id="infoFeeType" name="infoFeeType" required>
                                            <option value="none" <#if company.infoFeeType?? && company.infoFeeType=="none">selected="selected"</#if>>
                                            	不扣取
                                            </option>
                                            <option value="acceptTask" <#if company.infoFeeType?? && company.infoFeeType=="acceptTask">selected="selected"</#if>>
                                               	 接单时扣取
                                            </option>
                                            <option value="finishTask" <#if company.infoFeeType?? && company.infoFeeType=="finishTask">selected="selected"</#if>>
                                            	完成时扣取
                                            </option>
                                        </select>
                                    </div>
                                </div>
                                
                                <div class="form-group">
                                    <label class="col-sm-1 control-label">上线最低金额：</label>
                                    <div class="col-sm-2">
                                    	<div class="input-group">
                                            <input class="form-control" value="${company.lowestWorkVirtual?if_exists}" name="lowestWorkVirtual" type="number" min="0"/>
                                            <span class="input-group-addon">元</span>
                                        </div>
                                    </div>
                                </div>
                                
                                <div class="form-group">
                                    <label class="col-sm-1 control-label"></label>
                                    <div class="col-sm-10">
                                    	<div class="input-group">
                                    		<@djsq>
                                            <label style="padding-right:50px;">
											  <input type="checkbox" name="allowPayRule" <#if company.allowPayRule>checked="checked"</#if>/> 允许司机自行设置收费标准
											</label>
											</@djsq>
											<label style="padding-right:50px;">
											  <input type="checkbox" name="allowDjx" <#if company.allowDjx>checked="checked"</#if>/> 允许司机投代驾险
											</label>
											<label style="padding-right:50px;">
											  <input type="checkbox" name="allowYwx" <#if company.allowYwx>checked="checked"</#if>/> 允许司机投意外险
											</label>
                                        </div>
                                    </div>
                                </div>
                                
                                <div class="form-group">
                                    <label class="col-sm-1 control-label">代驾险说明：</label>
                                    <div class="col-sm-10">
                                        <textarea rows="5" cols="60" id="djxContent" name="djxContent">${company.djxContent?if_exists}</textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-1 control-label">意外险说明：</label>
                                    <div class="col-sm-10">
                                        <textarea rows="5" cols="60" id="ywxContent" name="ywxContent">${company.ywxContent?if_exists}</textarea>
                                    </div>
                                </div>
                                
                                <div class="form-group">
                                    <label class="col-sm-1 control-label">收费内容：</label>
                                    <div class="col-sm-10">
                                        <textarea rows="5" cols="60" id="feeContent" name="feeContent">${company.feeContent?if_exists}</textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="tab-pane fade" id="tab3">
                        <div class="panel panel-default margin-top">
                            <div class="panel-heading">客户推荐提成</div>
                            <div class="panel-body">
                                <@shiro.hasPermission name='memberrebate'>
                                    <input type="hidden" id="memberRebateId" name="memberRebateId" value="${memberRebate.id?if_exists}">
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label"></label>
                                        <label class="col-sm-2 control-label"></label>
                                        <div class="col-sm-8">
                                            <p class="form-control-static"><font color="red">注：不使用提成则设置为0或不填，一级提成指当前事件用户的推荐人。</font>
                                            </p>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-sm-2 control-label"></label>
                                        <label class="col-sm-2 control-label"><em>*</em>提成类型：</label>
                                        <div class="col-sm-8">
                                            <p class="form-control-static">
                                                <label style="padding-right:30px;">
                                                    <input type="radio" name="type_member" value="0" <#if memberRebate.type?? && memberRebate.type==0>checked="checked"</#if>>
                                                   	 一次性提成
                                                </label>
                                                <label style="padding-right:30px;">
                                                    <input type="radio" name="type_member" value="1" <#if memberRebate.type?? && memberRebate.type==1>checked="checked"</#if>>
                                                   	 按单提成
                                                </label>
                                            </p>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-sm-2 control-label"></label>
                                        <label class="col-sm-2 control-label"><em>*</em>提成等级：</label>
                                        <div class="col-sm-3">
                                            <select class="form-control" id="level_member" name="level_member" required>
                                                <option value="0" <#if memberRebate.level?? && memberRebate.level==0>selected="selected"</#if>>
                                                    	不提成
                                                </option>
                                                <option value="1" <#if memberRebate.level?? && memberRebate.level==1>selected="selected"</#if>>
                                                   		 一级提成
                                                </option>
                                                <option value="2" <#if memberRebate.level?? && memberRebate.level==2>selected="selected"</#if>>
                                                    	二级提成
                                                </option>
                                                <option value="3" <#if memberRebate.level?? && memberRebate.level==3>selected="selected"</#if>>
                                                    	三级提成
                                                </option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label"></label>
                                        <label class="col-sm-2 control-label">客户端二维码分享说明：</label>
                                        <div class="col-sm-3">
                                            <textarea rows="4" class="form-control" id="content" name="content_member">${memberRebate.content?if_exists}</textarea>
                                        </div>
                                    </div>

                                    <hr/>

                                    <div id="memberrebate_type_one" <#if memberRebate.type?? && memberRebate.type==0>style="display:block;"<#else>style="display:none;"</#if>>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label"></label>
                                            <label class="col-sm-2 control-label">奖励节点：</label>
                                            <div class="col-sm-3">
                                                <select class="form-control" id="member_reward_node" name="member_reward_node" required>
                                                    <#--<option value="0" <#if memberRebate.memberRewardNode?? && memberRebate.memberRewardNode==0>selected="selected"</#if>>-->
                                                        <#--首单完成支付-->
                                                    <#--</option>-->
                                                    <option value="1" <#if memberRebate.memberRewardNode?? && memberRebate.memberRewardNode==1>selected="selected"</#if>>
                                                        成功绑定手机号
                                                    </option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label"></label>
                                            <label class="col-sm-2 control-label">一级提成：</label>
                                            <div class="col-sm-3">
                                                <div class="input-group">
                                                    <input class="form-control"
                                                           value="${memberRebate.disposableMoney1?if_exists}"
                                                           name="disposableMoney1_member" type="number" min="0"/>
                                                    <span class="input-group-addon">元</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label"></label>
                                            <label class="col-sm-2 control-label">二级提成：</label>
                                            <div class="col-sm-3">
                                                <div class="input-group">
                                                    <input class="form-control"
                                                           value="${memberRebate.disposableMoney2?if_exists}"
                                                           name="disposableMoney2_member" type="number" min="0"/>
                                                    <span class="input-group-addon">元</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label"></label>
                                            <label class="col-sm-2 control-label">三级提成：</label>
                                            <div class="col-sm-3">
                                                <div class="input-group">
                                                    <input class="form-control"
                                                           value="${memberRebate.disposableMoney3?if_exists}"
                                                           name="disposableMoney3_member" type="number" min="0"/>
                                                    <span class="input-group-addon">元</span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div id="memberrebate_type_two" <#if memberRebate.type?? && memberRebate.type==1>style="display:block;"<#else>style="display:none;"</#if>>
                                        <div class="form-group">

                                            <h4><label class="col-sm-2 control-label">一级提成</label></h4>

                                            <label class="col-sm-2 control-label">提成（固定）：</label>
                                            <div class="col-sm-3">
                                                <div class="input-group">
                                                    <input class="form-control" value="${memberRebate.money1?if_exists}"
                                                           name="money1_member" type="number" min="0"/>
                                                    <span class="input-group-addon">元</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label"></label>
                                            <label class="col-sm-2 control-label">提成（比例）：</label>
                                            <div class="col-sm-3">
                                                <div class="input-group">
                                                    <input class="form-control"
                                                           value="${memberRebate.commission1?if_exists}"
                                                           name="commission1_member" type="number" min="0" max="100"/>
                                                    <span class="input-group-addon">%</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label"></label>
                                            <label class="col-sm-2 control-label">提成类型：</label>
                                            <p class="form-control-static">
                                                <label style="padding-right:20px;padding-left:15px;">
                                                    <input type="radio" name="memberRebateType1_member" value="guding" <#if memberRebate.memberRebateType1?? && memberRebate.memberRebateType1=='guding'>checked="checked"</#if>/>使用固定提成
                                                </label>
                                                <label>
                                                    <input type="radio" name="memberRebateType1_member" value="percent" <#if memberRebate.memberRebateType1?? && memberRebate.memberRebateType1=='percent'>checked="checked"</#if>/>使用比例提成
                                                </label>
                                            </p>
                                        </div>
                                        <hr/>

                                        <div class="form-group">

                                            <h4><label class="col-sm-2 control-label">二级提成</label></h4>

                                            <label class="col-sm-2 control-label">提成（固定）：</label>
                                            <div class="col-sm-3">
                                                <div class="input-group">
                                                    <input class="form-control" value="${memberRebate.money2?if_exists}" name="money2_member" type="number" min="0"/>
                                                    <span class="input-group-addon">元</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label"></label>
                                            <label class="col-sm-2 control-label">提成（比例）：</label>
                                            <div class="col-sm-3">
                                                <div class="input-group">
                                                    <input class="form-control" value="${memberRebate.commission2?if_exists}" name="commission2_member" type="number" min="0" max="100"/>
                                                    <span class="input-group-addon">%</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label"></label>
                                            <label class="col-sm-2 control-label">提成类型：</label>
                                            <p class="form-control-static">
                                                <label style="padding-right:20px;padding-left:15px;">
                                                    <input type="radio" name="memberRebateType2_member" value="guding" <#if memberRebate.memberRebateType2?? && memberRebate.memberRebateType2=='guding'>checked="checked"</#if>/>使用固定提成
                                                </label>
                                                <label>
                                                    <input type="radio" name="memberRebateType2_member" value="percent" <#if memberRebate.memberRebateType2?? && memberRebate.memberRebateType2=='percent'>checked="checked"</#if>/>使用比例提成
                                                </label>
                                            </p>
                                        </div>
                                        <hr/>

                                        <div class="form-group">

                                            <h4><label class="col-sm-2 control-label">三级提成</label></h4>

                                            <label class="col-sm-2 control-label">提成（固定）：</label>
                                            <div class="col-sm-3">
                                                <div class="input-group">
                                                    <input class="form-control" value="${memberRebate.money3?if_exists}" name="money3_member" type="number" min="0"/>
                                                    <span class="input-group-addon">元</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label"></label>
                                            <label class="col-sm-2 control-label">提成（比例）：</label>
                                            <div class="col-sm-3">
                                                <div class="input-group">
                                                    <input class="form-control" value="${memberRebate.commission3?if_exists}" name="commission3_member" type="number" min="0" max="100"/>
                                                    <span class="input-group-addon">%</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label"></label>
                                            <label class="col-sm-2 control-label">提成类型：</label>
                                            <p class="form-control-static">
                                                <label style="padding-right:20px;padding-left:15px;">
                                                    <input type="radio" name="memberRebateType3_member" value="guding" <#if memberRebate.memberRebateType3?? && memberRebate.memberRebateType3=='guding'>checked="checked"</#if>/>使用固定提成
                                                </label>
                                                <label>
                                                    <input type="radio" name="memberRebateType3_member" value="percent" <#if memberRebate.memberRebateType3?? && memberRebate.memberRebateType3=='percent'>checked="checked"</#if>/>使用比例提成
                                                </label>
                                            </p>
                                        </div>
                                    </div>
                                </@shiro.hasPermission>
                            </div>
                        </div>
                    </div>
<#--                    <div class="tab-pane fade" id="tab4">-->
<#--                        <div class="panel panel-default margin-top">-->
<#--                            <div class="panel-heading">服务人员推荐提成</div>-->
<#--                            <div class="panel-body">-->
<#--                                <@shiro.hasPermission name='driverrebate'>-->
<#--                                    <input type="hidden" id="driverRebateId" name="driverRebateId" value="${driverRebate.id?if_exists}">-->

<#--                                    <div class="form-group">-->
<#--                                        <label class="col-sm-2 control-label"></label>-->
<#--                                        <label class="col-sm-2 control-label"><em>*</em>提成类型：</label>-->
<#--                                        <div class="col-sm-8">-->
<#--                                            <p class="form-control-static">-->
<#--                                                <label style="padding-right:30px;">-->
<#--                                                    <input type="radio" name="type_driver" value="0" <#if driverRebate.type?? && driverRebate.type==0>checked="checked"</#if>>-->
<#--                                                    	一次性提成-->
<#--                                                </label>-->
<#--                                                <label style="padding-right:30px;">-->
<#--                                                    <input type="radio" name="type_driver" value="1" <#if driverRebate.type?? && driverRebate.type==1>checked="checked"</#if>>-->
<#--                                                    	按单提成-->
<#--                                                </label>-->
<#--                                            </p>-->
<#--                                        </div>-->
<#--                                    </div>-->

<#--                                    <div class="form-group">-->
<#--                                        <label class="col-sm-2 control-label"></label>-->
<#--                                        <label class="col-sm-2 control-label"><em>*</em>提成等级：</label>-->
<#--                                        <div class="col-sm-3">-->
<#--                                            <select class="form-control" id="level_driver" name="level_driver" required>-->
<#--                                                <option value="0" <#if driverRebate.level?? && driverRebate.level==0>selected="selected"</#if>>-->
<#--                                                   	 不提成-->
<#--                                                </option>-->
<#--                                                <option value="1"<#if driverRebate.level?? && driverRebate.level==1>selected="selected"</#if>>-->
<#--													 一级提成-->
<#--                                                </option>-->
<#--                                            </select>-->
<#--                                        </div>-->
<#--                                    </div>-->

<#--                                    <div class="form-group">-->
<#--                                        <label class="col-sm-2 control-label"></label>-->
<#--                                        <label class="col-sm-2 control-label">服务人员端二维码分享说明：</label>-->
<#--                                        <div class="col-sm-3">-->
<#--                                            <textarea rows="4" class="form-control" id="content" name="content_driver">${driverRebate.content?if_exists}</textarea>-->
<#--                                        </div>-->
<#--                                    </div>-->

<#--                                    <div id="driverrebate_type_one" <#if driverRebate.type?? && driverRebate.type==0>style="display:block;"<#else>style="display:none;"</#if>>-->
<#--                                        <div class="form-group">-->
<#--                                            <label class="col-sm-2 control-label"></label>-->
<#--                                            <label class="col-sm-2 control-label">奖励节点：</label>-->
<#--                                            <div class="col-sm-3">-->
<#--                                                <select class="form-control" id="driverRewardNode" name="driver_reward_node" required>-->
<#--                                                    &lt;#&ndash;<option value="0" <#if driverRebate.driverRewardNode?? && driverRebate.driverRewardNode==0>selected="selected"</#if>>&ndash;&gt;-->
<#--                                                        &lt;#&ndash;首单完成支付&ndash;&gt;-->
<#--                                                    &lt;#&ndash;</option>&ndash;&gt;-->
<#--                                                    <option value="1" <#if driverRebate.driverRewardNode?? && driverRebate.driverRewardNode==1>selected="selected"</#if>>-->
<#--                                                        成功绑定手机号-->
<#--                                                    </option>-->
<#--                                                </select>-->
<#--                                            </div>-->
<#--                                        </div>-->
<#--                                        <div class="form-group">-->
<#--                                            <label class="col-sm-2 control-label"></label>-->
<#--                                            <label class="col-sm-2 control-label">提成：</label>-->
<#--                                            <div class="col-sm-3">-->
<#--                                                <div class="input-group">-->
<#--                                                    <input class="form-control" value="${driverRebate.disposableMoney1?if_exists}" name="disposableMoney1_driver" type="number" min="0"/>-->
<#--                                                    <span class="input-group-addon">元</span>-->
<#--                                                </div>-->
<#--                                            </div>-->
<#--                                        </div>-->
<#--                                    </div>-->

<#--                                    <div id="driverrebate_type_two" <#if driverRebate.type?? && driverRebate.type==1>style="display:block;" <#else>style="display:none;"</#if>>-->
<#--                                        <div class="form-group">-->

<#--                                            <h4><label class="col-sm-2 control-label"></label></h4>-->

<#--                                            <label class="col-sm-2 control-label">提成（固定）：</label>-->
<#--                                            <div class="col-sm-3">-->
<#--                                                <div class="input-group">-->
<#--                                                    <input class="form-control" value="${driverRebate.money1?if_exists}" name="money1_driver" type="number" min="0"/>-->
<#--                                                    <span class="input-group-addon">元</span>-->
<#--                                                </div>-->
<#--                                            </div>-->
<#--                                        </div>-->
<#--                                        <div class="form-group">-->
<#--                                            <label class="col-sm-2 control-label"></label>-->
<#--                                            <label class="col-sm-2 control-label">提成（比例）：</label>-->
<#--                                            <div class="col-sm-3">-->
<#--                                                <div class="input-group">-->
<#--                                                    <input class="form-control" value="${driverRebate.commission1?if_exists}" name="commission1_driver" type="number" min="0" max="100"/>-->
<#--                                                    <span class="input-group-addon">%</span>-->
<#--                                                </div>-->
<#--                                            </div>-->
<#--                                        </div>-->
<#--                                        <div class="form-group">-->
<#--                                            <label class="col-sm-2 control-label"></label>-->
<#--                                            <label class="col-sm-2 control-label">提成类型：</label>-->
<#--                                            <p class="form-control-static">-->
<#--                                                <label style="padding-right:20px;padding-left:15px;">-->
<#--                                                    <input type="radio" name="driverRebateType1_driver" value="guding" <#if driverRebate.driverRebateType1?? && driverRebate.driverRebateType1=='guding'>checked="checked"</#if>/>使用固定提成-->
<#--                                                </label>-->
<#--                                                <label>-->
<#--                                                    <input type="radio" name="driverRebateType1_driver" value="percent" <#if driverRebate.driverRebateType1?? && driverRebate.driverRebateType1=='percent'>checked="checked"</#if>/>使用比例提成-->
<#--                                                </label>-->
<#--                                            </p>-->
<#--                                        </div>-->

<#--                                    </div>-->
<#--                                </@shiro.hasPermission>-->
<#--                            </div>-->
<#--                        </div>-->
<#--                    </div>-->
                    
                    <@gasstation>
                	<@shiro.hasPermission name='gasstation'>
                    <div class="tab-pane fade" id="tab13">
                        <div class="panel panel-default margin-top">
                            <div class="panel-heading">加油推荐提成</div>
                            <div class="panel-body">
                                <input id="gasRebateId" name="gasRebateId" type="hidden" value="${gasRebate.id?if_exists}">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"></label>
                                    <label class="col-sm-2 control-label"></label>
                                    <div class="col-sm-8">
                                        <p class="form-control-static"><font color="red">注：不使用提成则设置为0或不填，一级提成指当前事件用户的推荐人。</font>
                                        </p>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label"></label>
                                    <label class="col-sm-2 control-label"><em>*</em>提成等级：</label>
                                    <div class="col-sm-3">
                                        <select class="form-control" id="level_gas" name="level_gas" required>
                                            <option value="0" <#if gasRebate.level?? && gasRebate.level==0>selected="selected"</#if>>
                                                	不提成
                                            </option>
                                            <option value="1" <#if gasRebate.level?? && gasRebate.level==1>selected="selected"</#if>>
                                               		一级提成
                                            </option>
                                            <option value="2" <#if gasRebate.level?? && gasRebate.level==2>selected="selected"</#if>>
                                                	二级提成
                                            </option>
                                            <option value="3" <#if gasRebate.level?? && gasRebate.level==3>selected="selected"</#if>>
                                                	三级提成
                                            </option>
                                        </select>
                                    </div>
                                </div>

                                <hr/>

                                <div id="gasrebate_type_two">
                                    <div class="form-group">

                                        <h4><label class="col-sm-2 control-label">一级提成</label></h4>

                                        <label class="col-sm-2 control-label">提成（固定）：</label>
                                        <div class="col-sm-3">
                                            <div class="input-group">
                                                <input class="form-control" value="${gasRebate.money1?if_exists}"
                                                       name="money1_gas" type="number" min="0"/>
                                                <span class="input-group-addon">元</span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label"></label>
                                        <label class="col-sm-2 control-label">提成（比例）：</label>
                                        <div class="col-sm-3">
                                            <div class="input-group">
                                                <input class="form-control"
                                                       value="${gasRebate.commission1?if_exists}"
                                                       name="commission1_gas" type="number" min="0" max="100"/>
                                                <span class="input-group-addon">%</span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label"></label>
                                        <label class="col-sm-2 control-label">提成类型：</label>
                                        <p class="form-control-static">
                                            <label style="padding-right:20px;padding-left:15px;">
                                                <input type="radio" name="gasRebateType1_gas" value="guding" <#if gasRebate.gasRebateType1?? && gasRebate.gasRebateType1=='guding'>checked="checked"</#if>/>使用固定提成
                                            </label>
                                            <label>
                                                <input type="radio" name="gasRebateType1_gas" value="percent" <#if gasRebate.gasRebateType1?? && gasRebate.gasRebateType1=='percent'>checked="checked"</#if>/>使用比例提成
                                            </label>
                                        </p>
                                    </div>
                                    <hr/>

                                    <div class="form-group">

                                        <h4><label class="col-sm-2 control-label">二级提成</label></h4>

                                        <label class="col-sm-2 control-label">提成（固定）：</label>
                                        <div class="col-sm-3">
                                            <div class="input-group">
                                                <input class="form-control" value="${gasRebate.money2?if_exists}" name="money2_gas" type="number" min="0"/>
                                                <span class="input-group-addon">元</span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label"></label>
                                        <label class="col-sm-2 control-label">提成（比例）：</label>
                                        <div class="col-sm-3">
                                            <div class="input-group">
                                                <input class="form-control" value="${gasRebate.commission2?if_exists}" name="commission2_gas" type="number" min="0" max="100"/>
                                                <span class="input-group-addon">%</span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label"></label>
                                        <label class="col-sm-2 control-label">提成类型：</label>
                                        <p class="form-control-static">
                                            <label style="padding-right:20px;padding-left:15px;">
                                                <input type="radio" name="gasRebateType2_gas" value="guding" <#if gasRebate.gasRebateType2?? && gasRebate.gasRebateType2=='guding'>checked="checked"</#if>/>使用固定提成
                                            </label>
                                            <label>
                                                <input type="radio" name="gasRebateType2_gas" value="percent" <#if gasRebate.gasRebateType2?? && gasRebate.gasRebateType2=='percent'>checked="checked"</#if>/>使用比例提成
                                            </label>
                                        </p>
                                    </div>
                                    <hr/>

                                    <div class="form-group">

                                        <h4><label class="col-sm-2 control-label">三级提成</label></h4>

                                        <label class="col-sm-2 control-label">提成（固定）：</label>
                                        <div class="col-sm-3">
                                            <div class="input-group">
                                                <input class="form-control" value="${gasRebate.money3?if_exists}" name="money3_gas" type="number" min="0"/>
                                                <span class="input-group-addon">元</span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label"></label>
                                        <label class="col-sm-2 control-label">提成（比例）：</label>
                                        <div class="col-sm-3">
                                            <div class="input-group">
                                                <input class="form-control" value="${gasRebate.commission3?if_exists}" name="commission3_gas" type="number" min="0" max="100"/>
                                                <span class="input-group-addon">%</span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label"></label>
                                        <label class="col-sm-2 control-label">提成类型：</label>
                                        <p class="form-control-static">
                                            <label style="padding-right:20px;padding-left:15px;">
                                                <input type="radio" name="gasRebateType3_gas" value="guding" <#if gasRebate.gasRebateType3?? && gasRebate.gasRebateType3=='guding'>checked="checked"</#if>/>使用固定提成
                                            </label>
                                            <label>
                                                <input type="radio" name="gasRebateType3_gas" value="percent" <#if gasRebate.gasRebateType3?? && gasRebate.gasRebateType3=='percent'>checked="checked"</#if>/>使用比例提成
                                            </label>
                                        </p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    </@shiro.hasPermission>
                	</@gasstation>

                    <div class="tab-pane fade in" id="tab5">
                        <div class="panel panel-default margin-top">
                            <div class="panel-heading">
                               	 客户二维码
                               	<#--
                                <button type="button" href="javascript:;" class="pull-right uploadify-button " style="height:25px;line-height:25px;width:120px;" id="picture_upload_dialog">
                                	<i class="glyphicon glyphicon-open"></i>&nbsp;图片上传
                                </button>
                                -->
                            </div>
                            <div class="panel-body">
                            	<#--
                                <div class="col-md-5">
                                    <div class="form-group">
                                        <label class="col-sm-6 control-label"></label>
                                        <div class="col-sm-6">
                                            <img id="picture_img" width="216" height="384" <#if company.picture??>src="${ctx}/${company.picture?if_exists}"</#if>/>
                                            <input style="display:none;" type="file" name="imgFile" id="picture_file" accept=".bmp,.gif,.jpeg,.jpg,.png">
                                            <input type="hidden" id="picture" name="picture" value="${company.picture?if_exists}">
                                        </div>
                                    </div>
                                </div>
                                -->
                                <div class="col-md-6">

                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">提示：</label>
                                        <div class="col-sm-6">
                                            <p class="form-control-static">图片用于客户扫描二维码后看到的界面</p>
                                            <p>建议大小：1080 x 1920</p>
                                            <p>标题和内容用于分享后看见的文字</p>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">标题：</label>
                                        <div class="col-sm-6">
                                            <input class="form-control" id="introduceTitle" name="introduceTitle" type="text" value="${company.introduceTitle?if_exists}"/>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">内容：</label>
                                        <div class="col-sm-6">
                                            <textarea rows="5" class="form-control" id="introduceContent" name="introduceContent">${company.introduceContent?if_exists}</textarea>
                                        </div>
                                    </div>

                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="tab-pane fade" id="tab6">
                        <div class="panel panel-default margin-top">
                            <div class="panel-heading">
                            	服务人员二维码
                                <#--
                                <button type="button" href="javascript:;" class="pull-right uploadify-button  button-tiny" style="height:25px;line-height:25px;width:120px;" id="picture2_upload_dialog">
                                	<i class="glyphicon glyphicon-open"></i>&nbsp;图片上传
                                </button>
                                -->
                            </div>
                            <div class="panel-body">
                            	<#--
                                <div class="col-md-5">
                                    <div class="form-group">
                                        <label class="col-sm-6 control-label"></label>
                                        <div class="col-sm-6">
                                            <img id="picture2_img" width="216" height="384" <#if company.picture2??>src="${ctx}/${company.picture2?if_exists}"</#if>/>
                                            <input style="display:none;" type="file" name="imgFile" id="picture2_file" accept=".bmp,.gif,.jpeg,.jpg,.png">
                                            <input type="hidden" id="picture2" name="picture2" value="${company.picture2?if_exists}">
                                        </div>
                                    </div>
                                </div>
                                -->
                                <div class="col-md-6">

                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">提示：</label>
                                        <div class="col-sm-6">
                                            <p class="form-control-static">图片用于客户扫描服务人员二维码后看到的界面</p>
                                            <p>建议大小：1080 x 1920</p>
                                            <p>标题和内容用于分享后看见的文字</p>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">标题：</label>
                                        <div class="col-sm-6">
                                            <input class="form-control" id="introduceTitle2" name="introduceTitle2" type="text" value="${company.introduceTitle2?if_exists}"/>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">内容：</label>
                                        <div class="col-sm-6">
                                            <textarea rows="5" class="form-control" id="introduceContent2" name="introduceContent2">${company.introduceContent2?if_exists}</textarea>
                                        </div>
                                    </div>

                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="tab-pane fade" id="tab7">
                        <div class="panel panel-default margin-top">
                            <div class="panel-heading">客户服务协议</div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="col-sm-1 control-label"></label>
                                    <div class="col-sm-10">
                                        <textarea rows="50" cols="200" id="agreement" name="agreement">${company.agreement?if_exists}</textarea>
                                        <span class="help-block">配置客户服务协议，用于在APP中进行显示。</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="tab-pane fade" id="tab8">
                        <div class="panel panel-default margin-top">
                            <div class="panel-heading">服务人员协议</div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="col-sm-1 control-label"></label>
                                    <div class="col-sm-10">
                                        <textarea rows="50" cols="200" id="agreementEmploy" name="agreementEmploy">${company.agreementEmploy?if_exists}</textarea>
                                        <span class="help-block">配置服务人员协议，用于在APP中进行显示。</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="tab-pane fade" id="tab9">
                        <div class="panel panel-default margin-top">
                            <div class="panel-heading">分享设置</div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">分享标题：</label>
                                    <div class="col-sm-3">
                                        <input type="text" class="form-control" id="shareTitle" name="shareTitle" maxlength="20" value="${company.shareTitle?if_exists}">
                                        <span class="help-block">配置分享标题，用于在APP中进行显示，20字以内。</span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">分享内容：</label>
                                    <div class="col-sm-9">
                                        <textarea rows="8" cols="58" id="shareContent" name="shareContent" maxlength="140">${company.shareContent?if_exists}</textarea>
                                        <span class="help-block">配置分享内容，用于在APP中进行显示，140字以内。</span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">分享图片：</label>
                                    <div class="col-sm-2">
                                        <img id="shareImage_img" <#if company.shareImage??>src="${ctx}/${company.shareImage}"</#if> width="225" height="225"/>
                                        <input style="display:none;" type="file" name="imgFile" id="shareImage_file" accept=".bmp,.gif,.jpeg,.jpg,.png">
                                        <input type="hidden" id="shareImage" name="shareImage" value="${company.shareImage?if_exists}">
                                        <span class="help-block">单击上传图片,建议图片大小450×450。</span>
                                    </div>
                                    <div class="col-sm-2">
                                        <button type="button" class="pull-right uploadify-button  button-tiny" style="height:25px;line-height:25px;width:120px;" id="shareImage_btn">
                                        	<i class="glyphicon glyphicon-open"></i>&nbsp;图片上传
                                        </button>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">分享链接：</label>
                                    <div class="col-sm-3">
                                        <input type="text" class="form-control" id="shareURL" name="shareURL" value="${company.shareURL?if_exists}">
                                        <span class="help-block">配置分享链接，用于在APP中分享使用,必须以"http://"开头</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <div class="tab-pane fade" id="tab10">
                        <div class="panel panel-default margin-top">
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">自定义标题：</label>
                                    <div class="col-sm-3">
                                        <input type="text" class="form-control" id="customTitle" name="customTitle" maxlength="20" value="${company.customTitle?if_exists}">
                                        <span class="help-block">配置自定义标题，用于在APP中进行显示，10字以内。</span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">自定义内容：</label>
                                    <div class="col-sm-9">
                                        <textarea rows="50" cols="200" id="customContent" name="customContent">${company.customContent?if_exists}</textarea>
                                        <span class="help-block">配置自定义内容，用于在APP中进行显示。</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--网约车平台公司基础信息 -->
                    <div class="tab-pane fade in " id="tab11">
                        <div class="panel panel-default margin-top">
                            <div class="panel-heading">公司基础信息&nbsp;&nbsp;&nbsp;<span style="color:red">注：若打开上传监管平台开关，以下信息为必填内容</span></div>
                            <div class="panel-body">
                                <div class="col-sm-9" style="padding: 0px;">
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">统一社会信用代码：</label>
                                        <div class="col-sm-3">
                                            <input type="text" class="form-control" id="unifiedSocialCreditCode" name="unifiedSocialCreditCode"  value="${company.unifiedSocialCreditCode?if_exists}">
                                        </div>
                                        <label class="col-sm-3 control-label">网络预约出租汽车经营许可证号：</label>
                                        <div class="col-sm-3">
                                            <input type="text" class="form-control" id="netAboutcarBusinessLicenseNo" name="netAboutcarBusinessLicenseNo"  value="${company.netAboutcarBusinessLicenseNo?if_exists}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">经营区域：</label>
                                        <!--
                                        <div class="col-sm-3">
                                            <input type="text" class="form-control" id="operatingRegion" name="operatingRegion"  value="${company.operatingRegion?if_exists}">
                                        </div>
                                        -->
                                         <div class="col-sm-3">
                                        	<select class="form-control operatingRegion_class" id="operatingRegion_select">
                                            </select>
                                        	<input type="hidden" id="operatingRegion" name="operatingRegion" value="${company.operatingRegion?if_exists}">
                                        	<input type="hidden" id="operatingRegionName" name="operatingRegionName" value="${company.operatingRegionName?if_exists}">
                                        </div>
                                        
                                        <label class="col-sm-3 control-label">注册地行政区划代码：</label>
                                        <!--
                                        <div class="col-sm-3">
                                            <input type="text" class="form-control" id="customTitle" name="administrativeDivisionNo" value="${company.administrativeDivisionNo?if_exists}">
                                        </div>
                                        -->
                                         <div class="col-sm-3">
                                        	<select class="form-control administrativeDivisionNo_class" id="administrativeDivisionNo_select">
                                            </select>
                                        	<input type="hidden" id="administrativeDivisionNo" name="administrativeDivisionNo" value="${company.administrativeDivisionNo?if_exists}">
                                        	<input type="hidden" id="administrativeDivisionNoArr" name="administrativeDivisionNoArr" value="${company.administrativeDivisionNoArr?if_exists}">
                                        </div>
                                     </div>
                                     
                                     <div class="form-group">
                                     	<label class="col-sm-3 control-label">经营许可证发证机构：</label>
                                        <div class="col-sm-3">
                                            <input type="text" class="form-control" id="operatingLicenseIssuingAgency" name="operatingLicenseIssuingAgency" value="${company.operatingLicenseIssuingAgency?if_exists}">
                                        </div>
                                        <label class="col-sm-3 control-label">经营许可证初次发证日期：</label>
                                        <div class="col-sm-3">
                                            <input type="text" class="form-control" id="operatingLicenseIssuingDate" name="operatingLicenseIssuingDate"  value="<#if company.operatingLicenseIssuingDate??>${company.operatingLicenseIssuingDate?string("yyyy-MM-dd")}</#if>">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">经营许可证有效期起：</label>
                                        <div class="col-sm-3">
                                            <input type="text" class="form-control" id="operatingLicenseValidityPeriodStart" name="operatingLicenseValidityPeriodStart" value="<#if company.operatingLicenseValidityPeriodStart??>${company.operatingLicenseValidityPeriodStart?string("yyyy-MM-dd")}</#if>">
                                        </div>
                                        <label class="col-sm-3 control-label">经营许可证有效期止：</label>
                                        <div class="col-sm-3">
                                            <input type="text" class="form-control" id="operatingLicenseValidityPeriodEnd" name="operatingLicenseValidityPeriodEnd" value="<#if company.operatingLicenseValidityPeriodEnd??>${company.operatingLicenseValidityPeriodEnd?string("yyyy-MM-dd")}</#if>">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">经营户经济类型：</label>
                                        
                                        <!--
                                         <div class="col-sm-3">
                                            <input type="text" class="form-control" id="economicTypesOfOperatingHousehold" name="economicTypesOfOperatingHousehold" value="${company.economicTypesOfOperatingHousehold?if_exists}">
                                        </div>
                                        -->
                                    	<div class="col-sm-3">
                                        	<select class="form-control economicTypesOfOperatingHousehold_class" id="economicTypesOfOperatingHousehold_select"></select>
                                        	<input type="hidden" id="economicTypesOfOperatingHousehold" name="economicTypesOfOperatingHousehold" value="${company.economicTypesOfOperatingHousehold?if_exists}">
                                        	<input type="hidden" id="economicTypesOfOperatingHouseholdName" name="economicTypesOfOperatingHouseholdName" value="${company.economicTypesOfOperatingHouseholdName?if_exists}">
                                    	</div>
                                       <label class="col-sm-3 control-label">注册资本：</label>
                                        <div class="col-sm-3">
                                            <input type="Number" class="form-control" id="registeredCapital" name="registeredCapital"  value="${company.registeredCapital?if_exists}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">注册网络预约出租车车辆数：</label>
                                        <div class="col-sm-3">
                                            <input type="Number" class="form-control" id="registeredVehiclesNumber" name="registeredVehiclesNumber" value="${company.registeredVehiclesNumber?if_exists}">
                                        </div>
                                        <label class="col-sm-3 control-label">注册网络预约出租车驾驶员数量：</label>
                                        <div class="col-sm-3">
                                            <input type="Number" class="form-control" id="registeredDriverNumber" name="registeredDriverNumber"  value="${company.registeredDriverNumber?if_exists}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">法定代表人：</label>
                                        <div class="col-sm-3">
                                            <input type="text" class="form-control" id="legalRepresentative" name="legalRepresentative"  value="${company.legalRepresentative?if_exists}">
                                        </div>
                                        <label class="col-sm-3 control-label">法定代表人身份证号：</label>
                                        <div class="col-sm-3">
                                            <input type="text" class="form-control" id="legalRepresentativeIDCard" name="legalRepresentativeIDCard" value="${company.legalRepresentativeIDCard?if_exists}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">法定代表人电话号码：</label>
                                        <div class="col-sm-3">
                                            <input type="text" class="form-control" id="legalRepresentativePhone" name="legalRepresentativePhone"  value="${company.legalRepresentativePhone?if_exists}">
                                        </div>
                                    </div>
                                    
                                     <div class="form-group">
                                        <label class="col-sm-3 control-label">通信地址：</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control" id="mailingAddress" name="mailingAddress" value="${company.mailingAddress?if_exists}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">经营范围：</label>
                                        <div class="col-sm-9">
                                            <textarea rows="8" cols="143" id="businessScope" name="businessScope" maxlength="500">
                                            ${company.businessScope?if_exists}
                                            </textarea>
                                        </div>
                                    </div>
                                    
                                    <!--<div class="form-group">
                                         <label class="col-sm-3 control-label">法定代表人身份证照片：</label>
                                        <div class="col-sm-3">
                                            <input type="text" class="form-control" id="customTitle" name="legalRepresentativePhoto" maxlength="20" value="">
                                        </div>
                                    </div>-->
                                    <input type="hidden" class="form-control" id="legalRepresentativePhoto"  name="legalRepresentativePhoto" value="${company.legalRepresentativePhoto?if_exists}" >
                                </div>
                                <div class="col-sm-3" style="text-align: center;">
                                    <a class= "btn btn-info" id="uploadIDCared" >法定代表人身份证照片上传</a>
                                    <div style="margin:40px;text-align: center;" >

                                       <#-- <#assign tempctx= request.contextPath />-->
                                        <img src="<#if company.legalRepresentativePhoto??>${ctx}/${company.legalRepresentativePhoto}<#else>${ctx}/assets/img/noImg.png</#if>" id="showIDCardImg" onerror="javascript:this.src='${ctx}/assets/img/noImg.png'"  class="img-responsive img-rounded" style="background-color:#B0B0B0;" alt="请上传身份证">
                                        <input type="file" id="iDCaredImgFile" name="imgFile" style="display:none;">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- 网约车平台公司服务所在地服务机构基本信息 -->
                    <div class="tab-pane fade in " id="tab12">
                        <div class="panel panel-default margin-top">
                            <div class="panel-heading">公司服务所在地服务机构基本信息&nbsp;&nbsp;&nbsp;<span style="color:red">注：若打开上传监管平台开关，以下信息为必填内容</span></div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">服务机构所在地行政区划编码 ：</label>
                                    
                                    <!--
                                     <div class="col-sm-3">
                                        <input type="text" class="form-control"  name="serviceAgenciesNumber" value="${company.serviceAgenciesNumber?if_exists}">
                                    </div>
                                    -->
                                     <div class="col-sm-3">
                                    	<select class="form-control serviceAgenciesNumber_class" id="serviceAgenciesNumber_select">
                                        </select>
                                        <input type="hidden" id="serviceAgenciesNumber" name="serviceAgenciesNumber" value="${company.serviceAgenciesNumber?if_exists}">
                                        <input type="hidden" id="serviceAgenciesNumberArr" name="serviceAgenciesNumberArr" value="${company.serviceAgenciesNumberArr?if_exists}">
                                    </div>
                                   
                                    <label class="col-sm-2 control-label">服务机构名称：</label>
                                    <div class="col-sm-3">
                                        <input type="text" class="form-control"  id="serviceAgenciesName" name="serviceAgenciesName"  value="${company.serviceAgenciesName?if_exists}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">服务机构代码：</label>
                                    <div class="col-sm-3">
                                        <input type="text" class="form-control" id="serviceAgenciesCode" name="serviceAgenciesCode"  value="${company.serviceAgenciesCode?if_exists}">
                                    </div>
                                    <label class="col-sm-2 control-label">服务机构具体地址：</label>
                                    <div class="col-sm-3">
                                        <input type="text" class="form-control" id="serviceAgenciesAddress" name="serviceAgenciesAddress"  value="${company.serviceAgenciesAddress?if_exists}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">服务机构负责人名称：</label>
                                    <div class="col-sm-3">
                                        <input type="text" class="form-control" id="serviceAgenciesChargePersonName" name="serviceAgenciesChargePersonName" value="${company.serviceAgenciesChargePersonName?if_exists}">
                                    </div>
                                    <label class="col-sm-2 control-label">服务机构负责人联系方式：</label>
                                    <div class="col-sm-3">
                                        <input type="text" class="form-control" id="serviceAgenciesChargePersonPhone" name="serviceAgenciesChargePersonPhone"  value="${company.serviceAgenciesChargePersonPhone?if_exists}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">服务机构管理人姓名：</label>
                                    <div class="col-sm-3">
                                        <input type="text" class="form-control" id="serviceAgenciesCustodianName" name="serviceAgenciesCustodianName" value="${company.serviceAgenciesCustodianName?if_exists}">
                                    </div>
                                    <label class="col-sm-2 control-label">服务机构管理人联系方式：</label>
                                    <div class="col-sm-3">
                                        <input type="text" class="form-control" id="serviceAgenciesCustodianPhone" name="serviceAgenciesCustodianPhone"  value="${company.serviceAgenciesCustodianPhone?if_exists}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">行政文书送达邮寄地址：</label>
                                    <div class="col-sm-3">
                                        <input type="text" class="form-control" id="administrativeMailingAddress" name="administrativeMailingAddress"  value="${company.administrativeMailingAddress?if_exists}">
                                    </div>
                                    <label class="col-sm-2 control-label">服务机构紧急联系电话：</label>
                                    <div class="col-sm-3">
                                        <input type="text" class="form-control" id="agencyEmergencyTel" name="agencyEmergencyTel"  value="${company.agencyEmergencyTel?if_exists}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">服务机构设立日期：</label>
                                    <div class="col-sm-3">
                                        <input type="text" class="form-control" id="agenctCreateDate" name="agenctCreateDate" value="<#if company.agenctCreateDate??>${company.agenctCreateDate?date}</#if>">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--
                    <div class="tab-pane fade in active" id="tab14">
                        <div class="panel panel-default margin-top">
                            <div class="panel-heading">说明内容</div>
                            <div class="panel-body">
                                <div class="form-group">
                                    <label class="col-sm-1 control-label"></label>
                                    <div class="col-sm-10">
                                        <textarea rows="5" cols="60" id="protectFeeContent" name="protectFeeContent">${company.protectFeeContent?if_exists}</textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    -->
                </div>
            </form>
        </div>
    </div>
</div>

</@override>
<@override name="footer">
<script src="${ctx}/assets/js/ajaxfileupload.js"></script>
<script src="${ctx}/assets/js/district-all.js"></script>
<script src="${ctx}/assets/js/selectData.js"></script>
<script src="${ctx}/assets/js/linkagesel.js"></script>
<script src="${ctx}/assets/kindeditor/kindeditor-all-min.js"></script>
<script src="${ctx}/assets/kindeditor/lang/zh_CN.js"></script>
<script type="text/javascript">

   $(document).ready(function () {
   		
        //判断上传监管平台的开关是否开启
	 	var isUpPlatformInfo = "${isUpPlatformInfo?string('true','flase')}";

		//经营户经济类型,下拉框实现
		var economicTypesOfOperatingHousehold = {
	        data: economicTypesData,     // economicTypesData为selectData.js中定义的变量
	        selClass: 'form-control economicTypesOfOperatingHousehold_class',
	        head: '--请选择--',
	        selStyle: 'margin-top: 3px;',
	        fixWidth: 200,
	        defVal: getEconomicTypesDataIndex('${company.economicTypesOfOperatingHousehold?if_exists}'),
	        select:  '#economicTypesOfOperatingHousehold_select'
	    };
		var linkageSe3 = new LinkageSel(economicTypesOfOperatingHousehold);
		 linkageSe3.onChange(function() {
	    	var code=this.getSelectedData('code');// 最末选定菜单的zip数据值
	    	$("#economicTypesOfOperatingHousehold").val(code);
	    });
	    
	   
	    
		//经营区域 ,下拉框实现
		var operatingRegion = {
	        data: serviceZoneData,     // serviceZoneData为selectData.js中定义的变量
	        selClass: 'form-control operatingRegion_class',
	        head: '--请选择--',
	        selStyle: 'margin-top: 3px;',
	        fixWidth: 200,
	        defVal: getServiceZoneDataIndex('${company.operatingRegion?if_exists}'),
	        select:  '#operatingRegion_select'                                                                                                                                                                                                                                                                                                                                                                                                
	    };
	    
		var linkageSe4 = new LinkageSel(operatingRegion);
		 linkageSe4.onChange(function() {
	    	var code=this.getSelectedData('code');// 最末选定菜单的zip数据值
	    	$("#operatingRegion").val(code);
	    });
		
		
		//公司行政区划代码
		var cityopts = {
	        data: districtData,     // districtData为district-all.js中定义的变量
	        selClass: 'form-control administrativeDivisionNo_class',
	        head: '--请选择--',
	        selStyle: 'margin-top: 3px;',
	        fixWidth: 150,
	        defVal: [${company.administrativeDivisionNoArr?if_exists}],
	        select:  '#administrativeDivisionNo_select'
	    };
	    var linkageSel = new LinkageSel(cityopts);
	    linkageSel.onChange(function() {
	    	var code=this.getSelectedData('code');// 最末选定菜单的zip数据值
	    	$("#administrativeDivisionNo").val(code);
	    });
	    
	    //服务机构行政区划代码
	    var cityopts2 = {
	        data: districtData,     // districtData为district-all.js中定义的变量
	        selClass: 'form-control serviceAgenciesNumber_class',
	        head: '--请选择--',
	        selStyle: 'margin-top: 3px;',
	        fixWidth: 150,
	        defVal: [${company.serviceAgenciesNumberArr?if_exists}],
	        select:  '#serviceAgenciesNumber_select'
	    };
	    var linkageSel2 = new LinkageSel(cityopts2);
	    linkageSel2.onChange(function() {
	    	var code=this.getSelectedData('code');// 最末选定菜单的zip数据值
	    	$("#serviceAgenciesNumber").val(code);
	    });
	    
	    economicTypesOfOperatingHousehold = null;
	    
	    cityopts = null;
	    cityopts2 = null;
	    districtData = null;
		
        //客户推荐提成类型
        $("input[name=type_member]").change(function () {
            if ($(this).val() == "0") {
                $("#memberrebate_type_two").slideUp(300);
                $("#memberrebate_type_one").fadeIn(500);
            }
            else if ($(this).val() == "1") {
                $("#memberrebate_type_one").slideUp(300);
                $("#memberrebate_type_two").fadeIn(500);
            }
        });
        //司机推荐提成类型
        $("input[name=type_driver]").change(function () {
            if ($(this).val() == "0") {
                $("#driverrebate_type_two").slideUp(300);
                $("#driverrebate_type_one").fadeIn(500);
            }
            else if ($(this).val() == "1") {
                $("#driverrebate_type_one").slideUp(300);
                $("#driverrebate_type_two").fadeIn(500);
            }
        });
        
        KindEditor.ready(function (K) {
            K.create('#feeContent', {
                filterMode: false,
                uploadJson: '${ctx}/common/kindeditor/fileupload',
                allowUpload: true,
                fileManagerJson: '${ctx}/common/kindeditor/filemanager',
                allowFileManager: true,
                height: 500,
                width: '100%',
                resizeType: 0,
                afterCreate: function () {
                    var self = this;
                    K.ctrl(document, 13, function () {
                        self.sync();
                    });
                    K.ctrl(self.edit.doc, 13, function () {
                        self.sync();
                    });
                },
                afterBlur: function () {
                    this.sync();
                }
            });
        });
        KindEditor.ready(function (K) {
            K.create('#agreement', {
                filterMode: false,
                uploadJson: '${ctx}/common/kindeditor/fileupload',
                allowUpload: true,
                fileManagerJson: '${ctx}/common/kindeditor/filemanager',
                allowFileManager: true,
                height: 500,
                width: '100%',
                resizeType: 0,
                afterCreate: function () {
                    var self = this;
                    K.ctrl(document, 13, function () {
                        self.sync();
                    });
                    K.ctrl(self.edit.doc, 13, function () {
                        self.sync();
                    });
                },
                afterBlur: function () {
                    this.sync();
                }
            });
        });
        KindEditor.ready(function (K) {
            K.create('#customContent', {
                filterMode: false,
                uploadJson: '${ctx}/common/kindeditor/fileupload',
                allowUpload: true,
                fileManagerJson: '${ctx}/common/kindeditor/filemanager',
                allowFileManager: true,
                height: 500,
                width: '100%',
                resizeType: 0,
                afterCreate: function () {
                    var self = this;
                    K.ctrl(document, 13, function () {
                        self.sync();
                    });
                    K.ctrl(self.edit.doc, 13, function () {
                        self.sync();
                    });
                },
                afterBlur: function () {
                    this.sync();
                }
            });
        });
        KindEditor.ready(function (K) {
            K.create('#agreementEmploy', {
                filterMode: false,
                uploadJson: '${ctx}/common/kindeditor/fileupload',
                allowUpload: true,
                fileManagerJson: '${ctx}/common/kindeditor/filemanager',
                allowFileManager: true,
                height: 500,
                width: '100%',
                resizeType: 0,
                afterCreate: function () {
                    var self = this;
                    K.ctrl(document, 13, function () {
                        self.sync();
                    });
                    K.ctrl(self.edit.doc, 13, function () {
                        self.sync();
                    });
                },
                afterBlur: function () {
                    this.sync();
                }
            });
        });
        //分享图片上传
        $("#shareImage_img").click(function () {
            $("#shareImage_file").click();
        });
        $("#shareImage_btn").click(function () {
            $("#shareImage_file").click();
        });
        $(document).on('change', '#shareImage_file', function () {
            if ($.trim($(this).val())) {
                $.ajaxFileUpload({
                    url: '${ctx}/common/uploadimg',
                    secureuri: false,
                    fileElementId: 'shareImage_file',
                    dataType: 'json',
                    data:{'upload_img_token':${upload_img_logo_token}},
                    success: function (result, textStatus) {
                        if (result.success) {
                            $.scojs_message("上传成功", $.scojs_message.TYPE_OK);
                            $("#shareImage_img").attr("src", "${ctx}/" + result.url);
                            $("#shareImage").val(result.url);
                        }
                        else {
                            $.scojs_message(result.msg, $.scojs_message.TYPE_ERROR);
                        }
                    }
                });
            }
        });
        $("#picture_upload_dialog").click(function () {
            $("#picture_file").click();
        });
        $(document).on('change', '#picture_file', function () {
            if ($.trim($(this).val())) {
                $.ajaxFileUpload({
                    url: '${ctx}/common/uploadimg',
                    secureuri: false,
                    fileElementId: 'picture_file',
                    dataType: 'json',
                    success: function (result, textStatus) {
                        if (result.success) {
                            $.scojs_message("上传成功", $.scojs_message.TYPE_OK);
                            $("#picture_img").attr("src", "${ctx}/" + result.url);
                            $("#picture").val(result.url);
                        }
                        else {
                            $.scojs_message(result.msg, $.scojs_message.TYPE_ERROR);
                        }
                    }
                });
            }
        });
        $("#picture2_upload_dialog").click(function () {
            $("#picture2_file").click();
        });
        $(document).on('change', '#picture2_file', function () {
            if ($.trim($(this).val())) {
                $.ajaxFileUpload({
                    url: '${ctx}/common/uploadimg',
                    secureuri: false,
                    fileElementId: 'picture2_file',
                    dataType: 'json',
                    success: function (result, textStatus) {
                        if (result.success) {
                            $.scojs_message("上传成功", $.scojs_message.TYPE_OK);
                            $("#picture2_img").attr("src", "${ctx}/" + result.url);
                            $("#picture2").val(result.url);
                        }
                        else {
                            $.scojs_message(result.msg, $.scojs_message.TYPE_ERROR);
                        }
                    }
                });
            }
        });
        $("#shareURL").blur(function () {
            var url = $("#shareURL").val().trim();
            if (url.length > 0) {
                var index = url.indexOf("http://");
                if (index == -1 || index != 0) {
                    $.scojs_message("分享路径必须以http://开头", $.scojs_message.TYPE_ERROR);
                }
            }
        });
        //提交表单
        $("#submit_form").submit(function () {
            var url = $("#shareURL").val().trim();
            var image = $("#shareImage").val().trim();
            var content = $("#shareContent").val().trim();
            var title = $("#shareTitle").val().trim();
            if (title.length > 0) {
                if (url.length <= 0) {
                    $.scojs_message("请填写分享路径", $.scojs_message.TYPE_ERROR);
                    return false;
                }
            }
            if (content.length > 0) {
                if (title.length <= 0) {
                    $.scojs_message("请填写分享标题", $.scojs_message.TYPE_ERROR);
                    return false;
                }
            }
            if (image.length > 0) {
                if (content.length <= 0) {
                    $.scojs_message("请填写分享内容", $.scojs_message.TYPE_ERROR);
                    return false;
                }
            }
            if (url.length > 0) {
                var index = url.indexOf("http://");
                if (index == -1 || index != 0) {
                    $.scojs_message("分享路径必须以http://开头", $.scojs_message.TYPE_ERROR);
                    return false;
                }
                if (image.length <= 0) {
                    $.scojs_message("请上传要分享的图片", $.scojs_message.TYPE_ERROR);
                    return false;
                }
            }
            var customTitle = $("#customTitle").val().trim();
            if (customTitle != "" && customTitle.length > 10) {
                $.scojs_message("自定义标题内容过长", $.scojs_message.TYPE_ERROR);
                return false;
            }
            
             if ("true" == isUpPlatformInfo) {
               	
               	 //验证统一社会信用代码是否为空
               	 var unifiedSocialCreditCode = $("#unifiedSocialCreditCode").val().trim();
				 if (unifiedSocialCreditCode == "" || unifiedSocialCreditCode == null) {
                 	$.scojs_message("上传监管平台开关已开启，统一社会信用代码不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }
               	 //网络预约出租汽车经营许可证号是否为空
               	 var netAboutcarBusinessLicenseNo = $("#netAboutcarBusinessLicenseNo").val().trim();
				 if (netAboutcarBusinessLicenseNo == "" || netAboutcarBusinessLicenseNo == null) {
                 	$.scojs_message("上传监管平台开关已开启，网络预约出租汽车经营许可证号不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }
           	 	 //经营区域是否为空
               	 var operatingRegion = $("#operatingRegion").val().trim();
               	 
				 if (operatingRegion == "" || operatingRegion == null) {
                 	$.scojs_message("上传监管平台开关已开启，经营区域不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }
           	 	 //注册地行政区划代码是否为空
               	 var administrativeDivisionNo = $("#administrativeDivisionNo").val().trim();
				 if (administrativeDivisionNo == "" || administrativeDivisionNo == null) {
                 	$.scojs_message("上传监管平台开关已开启，注册地行政区划代码不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }else{
	           	 	if(administrativeDivisionNo.substring(2,4) == "00" && administrativeDivisionNo != "710000"  && administrativeDivisionNo != "810000"  && administrativeDivisionNo != "820000"){
	           	 		 $.scojs_message("上传监管平台开关已开启，省请选择市级（除台湾省），直辖市请选择下辖区", $.scojs_message.TYPE_ERROR);
	           	 		 return false;
	           	 	}
           	 	}
           	 	 //经营许可证发证机构是否为空
               	 var operatingLicenseIssuingAgency = $("#operatingLicenseIssuingAgency").val().trim();
				 if (operatingLicenseIssuingAgency == "" || operatingLicenseIssuingAgency == null) {
                 	$.scojs_message("上传监管平台开关已开启，经营许可证发证机构不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }
           	 	 //经营许可证初次发证日期是否正确
           	 	 var operatingLicenseIssuingDate =  $("#operatingLicenseIssuingDate").val();
                 if(operatingLicenseIssuingDate=="" || operatingLicenseIssuingDate == null ){
                	console.debug(isDate(operatingLicenseIssuingDate));
               		if (!isDate(operatingLicenseIssuingDate)){
                   		$.scojs_message("上传监管平台开关已开启，请选择经营许可证初次发证日期,如:2016-12-01", $.scojs_message.TYPE_ERROR);
                    	return false
                    }
                 }
           	 	 //经营许可证有效期起日期是否正确
           	 	 var operatingLicenseValidityPeriodStart =  $("#operatingLicenseValidityPeriodStart").val();
                 if(operatingLicenseValidityPeriodStart=="" || operatingLicenseValidityPeriodStart == null){
                	console.debug(isDate(operatingLicenseValidityPeriodStart));
               		if (!isDate(operatingLicenseValidityPeriodStart)){
                   		$.scojs_message("上传监管平台开关已开启，请选择经营许可证有效期起日期,如:2016-12-01", $.scojs_message.TYPE_ERROR);
                    	return false
                    }
                 }
           	 	 //经营许可证有效期止日期是否正确
           	 	 var operatingLicenseValidityPeriodEnd =  $("#operatingLicenseValidityPeriodEnd").val();
                 if(operatingLicenseValidityPeriodEnd=="" || operatingLicenseValidityPeriodEnd == null){
                	console.debug(isDate(operatingLicenseValidityPeriodEnd));
               		if (!isDate(operatingLicenseValidityPeriodEnd)){
                   		$.scojs_message("上传监管平台开关已开启，请选择经营许可证有效期止日期,如:2016-12-01", $.scojs_message.TYPE_ERROR);
                    	return false
                    }
                 }
                 //经营许可证有效期起日期不能在经营许可证初次发证日期之前
                 if((new Date(operatingLicenseValidityPeriodStart.replace("-","/")).getTime())-(new Date(operatingLicenseIssuingDate.replace("-","/")).getTime())<0){
  		  		    $.scojs_message("经营许可证有效期起不能在经营许可证初次发证日期之前", $.scojs_message.TYPE_ERROR);
  		  		    return false;
  		  		 }
                 //经营许可证有效期止日期不能在经营许可证有效期起日期之前
                 if((new Date(operatingLicenseValidityPeriodStart.replace("-","/")).getTime())-(new Date(operatingLicenseIssuingDate.replace("-","/")).getTime())<0){
  		  		    $.scojs_message("经营许可证有效期止日期不能在经营许可证有效期起日期之前", $.scojs_message.TYPE_ERROR);
  		  		    return false;
  		  		 }
                 //经营户经济类型是否为空
               	 var economicTypesOfOperatingHousehold = $("#economicTypesOfOperatingHousehold").val().trim();
				 if (economicTypesOfOperatingHousehold == "" || economicTypesOfOperatingHousehold == null) {
                 	$.scojs_message("上传监管平台开关已开启，经营户经济类型不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }
                 //注册资本是否为空
               	 var registeredCapital = $("#registeredCapital").val();
               	 if(registeredCapital == "" || registeredCapital == null){
               	 	$.scojs_message("上传监管平台开关已开启，注册资本不能为空", $.scojs_message.TYPE_ERROR);
               	 	return false;
               	 }else{
               	 	if (registeredCapital < 0 ) {
	                 	$.scojs_message("上传监管平台开关已开启，注册资本不能小于零", $.scojs_message.TYPE_ERROR);
	                	return false;
           	 	 	}
               	 }
				 
                 //注册网络预约出租车车辆数是否为空
               	 var registeredVehiclesNumber = $("#registeredVehiclesNumber").val().trim();
				 if (registeredVehiclesNumber == "" || registeredVehiclesNumber == null) {
                 	$.scojs_message("上传监管平台开关已开启，注册网络预约出租车车辆数不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }
                 //注册网络预约出租车驾驶员数量是否为空
               	 var registeredDriverNumber = $("#registeredDriverNumber").val().trim();
				 if (registeredDriverNumber == "" || registeredDriverNumber == null) {
                 	$.scojs_message("上传监管平台开关已开启，注册网络预约出租车驾驶员数量不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }
                 //法定代表人是否为空
               	 var legalRepresentative = $("#legalRepresentative").val().trim();
				 if (legalRepresentative == "" || legalRepresentative == null) {
                 	$.scojs_message("上传监管平台开关已开启，法定代表人不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }
                 //法定代表人身份证号是否为空
               	 var legalRepresentativeIDCard = $("#legalRepresentativeIDCard").val().trim();
				 if (legalRepresentativeIDCard == "" || legalRepresentativeIDCard == null) {
                 	$.scojs_message("上传监管平台开关已开启，法定代表人身份证号不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }
                 //法定代表人电话号码是否为空
               	 var legalRepresentativePhone = $("#legalRepresentativePhone").val().trim();
				 if (legalRepresentativePhone == "" || legalRepresentativePhone == null) {
                 	$.scojs_message("上传监管平台开关已开启，法定代表人电话号码不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }
           	 	  //通信地址是否为空
               	 var mailingAddress = $("#mailingAddress").val().trim();
				 if (mailingAddress == "" || mailingAddress == null) {
                 	$.scojs_message("上传监管平台开关已开启，通信地址不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }
               	 //经营范围是否为空
               	 var businessScope = $("#businessScope").val().trim();
				 if (businessScope == "" || businessScope == null) {
                 	$.scojs_message("上传监管平台开关已开启，经营范围不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }
           	 	 //法定代表人身份证照片是否为空
           	 	 var showIDCardImg =  $("#showIDCardImg")[0].src;
           	 	 var flag = showIDCardImg.indexOf("noImg.png");
           	 	 if(CheckImgExists(showIDCardImg)){
           	 	 	if(flag != -1){
	               		$.scojs_message("上传监管平台开关已开启，请上传法定代表人身份证照片", $.scojs_message.TYPE_ERROR);
	                	return false
                 	}
           	 	 }else{
           	 	 	$.scojs_message("上传监管平台开关已开启，请上传法定代表人身份证照片", $.scojs_message.TYPE_ERROR);
                	return false
           	 	 }
                 //服务机构所在地行政区划编码是否为空
               	 var serviceAgenciesNumber = $("#serviceAgenciesNumber").val().trim();
				 if (serviceAgenciesNumber == "" || serviceAgenciesNumber == null) {
                 	$.scojs_message("上传监管平台开关已开启，服务机构所在地行政区划编码不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }else{
	           	 	if(serviceAgenciesNumber.substring(2,4) == "00" && serviceAgenciesNumber != "710000"  && serviceAgenciesNumber != "810000"  && serviceAgenciesNumber != "820000"){
	           	 		 $.scojs_message("上传监管平台开关已开启，省请选择市级（除台湾省），直辖市请选择下辖区", $.scojs_message.TYPE_ERROR);
	           	 		 return false;
	           	 	}
           	 	}
                 //服务机构名称是否为空
               	 var serviceAgenciesName = $("#serviceAgenciesName").val().trim();
				 if (serviceAgenciesName == "" || serviceAgenciesName == null) {
                 	$.scojs_message("上传监管平台开关已开启，服务机构名称不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }
                 //服务机构代码是否为空
               	 var serviceAgenciesCode = $("#serviceAgenciesCode").val().trim();
				 if (serviceAgenciesCode == "" || serviceAgenciesCode == null) {
                 	$.scojs_message("上传监管平台开关已开启，服务机构代码不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }
           	 	 //服务机构具体地址：
               	 var serviceAgenciesAddress = $("#serviceAgenciesAddress").val().trim();
				 if (serviceAgenciesAddress == "" || serviceAgenciesAddress == null) {
                 	$.scojs_message("上传监管平台开关已开启，服务机构具体地址不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }
                 //服务机构负责人名称是否为空
               	 var serviceAgenciesChargePersonName = $("#serviceAgenciesChargePersonName").val().trim();
				 if (serviceAgenciesChargePersonName == "" || serviceAgenciesChargePersonName == null) {
                 	$.scojs_message("上传监管平台开关已开启，服务机构负责人名称不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }
                 //服务机构负责人联系方式是否为空
               	 var serviceAgenciesChargePersonPhone = $("#serviceAgenciesChargePersonPhone").val().trim();
				 if (serviceAgenciesChargePersonPhone == "" || serviceAgenciesChargePersonPhone == null) {
                 	$.scojs_message("上传监管平台开关已开启，服务机构负责人联系方式不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }
                 //服务机构管理人姓名是否为空
               	 var serviceAgenciesCustodianName = $("#serviceAgenciesCustodianName").val().trim();
				 if (serviceAgenciesCustodianName == "" || serviceAgenciesCustodianName == null) {
                 	$.scojs_message("上传监管平台开关已开启，服务机构管理人姓名不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }
                 //服务机构管理人联系方式是否为空
               	 var serviceAgenciesCustodianPhone = $("#serviceAgenciesCustodianPhone").val().trim();
				 if (serviceAgenciesCustodianPhone == "" || serviceAgenciesCustodianPhone == null) {
                 	$.scojs_message("上传监管平台开关已开启，服务机构管理人联系方式不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }
                 //行政文书送达邮寄地址是否为空
               	 var administrativeMailingAddress = $("#administrativeMailingAddress").val().trim();
				 if (administrativeMailingAddress == "" || administrativeMailingAddress == null) {
                 	$.scojs_message("上传监管平台开关已开启，行政文书送达邮寄地址不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }
                 //服务机构紧急联系电话是否为空
               	 var agencyEmergencyTel = $("#agencyEmergencyTel").val().trim();
				 if (agencyEmergencyTel == "" || agencyEmergencyTel == null) {
                 	$.scojs_message("上传监管平台开关已开启，服务机构紧急联系电话不能为空", $.scojs_message.TYPE_ERROR);
                	return false;
           	 	 }
                 //服务机构设立日期是否正确
           	 	 var agenctCreateDate =  $("#agenctCreateDate").val();
                 if(agenctCreateDate=="" || agenctCreateDate == null){
                	console.debug(isDate(agenctCreateDate));
               		if (!isDate(agenctCreateDate)){
                   		$.scojs_message("上传监管平台开关已开启，请选择服务机构设立日期,如:2016-12-01", $.scojs_message.TYPE_ERROR);
                    	return false
                    }
                 }
             
			 var administrativeDivisionNoIdsArr=[];
            $(".administrativeDivisionNo_class").each(function(index,element){
            	if($(element).val()!=""){
            		administrativeDivisionNoIdsArr.push($(element).val());
            	}
            	$("#administrativeDivisionNoArr").val(administrativeDivisionNoIdsArr.join(","));
            });
            
            var serviceAgenciesNumberIdsArr=[];
            $(".serviceAgenciesNumber_class").each(function(index,element){
            	if($(element).val()!=""){
            		serviceAgenciesNumberIdsArr.push($(element).val());
            	}
            	$("#serviceAgenciesNumberArr").val(serviceAgenciesNumberIdsArr.join(","));
            });
            
        }
            
            
			
            $("#submit_button").attr("disabled", true);
            return true;
        });
       
        $("#operatingLicenseValidityPeriodStart").datetimepicker({
	        format: "yyyy-mm-dd",
	        language: 'zh-CN',
	        showMeridian: true,
	        minView: "month",
	        autoclose: true,
	        todayBtn: true
	    });
		$("#operatingLicenseValidityPeriodEnd").datetimepicker({
			format: "yyyy-mm-dd",
	        language: 'zh-CN',
	        showMeridian: true,
	        minView: "month",
	        startDate: new Date(),
	        autoclose: true,
	        todayBtn: true
	    });
	    $("#operatingLicenseIssuingDate").datetimepicker({
			format: "yyyy-mm-dd",
	        language: 'zh-CN',
	        showMeridian: true,
	        minView: "month",
            endDate:new Date(),
	        autoclose: true,
	        todayBtn: true
	    });
		//服务机构设立日期
		 $("#agenctCreateDate").datetimepicker({
			format: "yyyy-mm-dd",
	        language: 'zh-CN',
	        showMeridian: true,
	        minView: "month",
            endDate:new Date(),
	        autoclose: true,
	        todayBtn: true
	    });
       
        //身份证照片上传
        $("#uploadIDCared").click(function () {
            $("#iDCaredImgFile").click();
        });
        $(document).on('change', '#iDCaredImgFile', function () {
            if ($.trim($(this).val())) {
                $.ajaxFileUpload({
                    url: '${ctx}/common/uploadIdcardimg',
                    secureuri: false,
                    fileElementId: 'iDCaredImgFile',
                    dataType: 'json',
                    success: function (result, textStatus) {
                        if (result.success) {
                            $.scojs_message("上传成功", $.scojs_message.TYPE_OK);
                            $("#showIDCardImg").attr("src", "${ctx}/" + result.url);
                            console.debug(result.url);
                            $("#legalRepresentativePhoto").val(result.url);
                            console.debug($("#iDCard").val());
                        }
                        else {
                            $.scojs_message(result.msg, $.scojs_message.TYPE_ERROR);
                        }
                    }
                });
            }
        });
    });
    function isDate(str)
    {
        var r = str.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/);
        if(r==null)return false;
        var d= new Date(r[1], r[3]-1, r[4]);
        return (d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]&&d.getDate()==r[4]);
    }
    function CheckImgExists(imgurl) {  
    var ImgObj = new Image(); //判断图片是否存在  
    ImgObj.src = imgurl;  
    //没有图片，则返回-1  
    if (ImgObj.fileSize > 0 || (ImgObj.width > 0 && ImgObj.height > 0)) {  
        return true;  
    } else {  
        return false;
    }  
} 
</script>
</@override>
<@extends name="../layout.ftl"/>
